package com.lagou.service;

import com.lagou.domain.Course;
import com.lagou.domain.CourseVO;

import java.lang.reflect.InvocationTargetException;
import java.util.List;

public interface CourseService {

    /**
     * 多条件查询课程列表
     *
     * @param courseVO
     * @return
     */
    List<Course> findCourseByCondition(CourseVO courseVO);

    /**
     * 保存课程信息
     *
     * @param courseVO
     */
    void saveCourseOrTeacher(CourseVO courseVO) throws InvocationTargetException, IllegalAccessException;

    /**
     * 根据id获取课程信息
     *
     * @param id 课程id
     * @return
     */
    CourseVO findCourseById(int id);

    /**
     * 修改课程信息
     *
     * @param courseVO
     */
    void updateCourseOrTeacher(CourseVO courseVO) throws InvocationTargetException, IllegalAccessException;

    /**
     * 更新课程状态
     *
     * @param id     课程id
     * @param status 课程状态
     */
    void updateCourseStatus(Integer id, Integer status);
}
